﻿<phone:PhoneApplicationPage 
    x:Class="MVBuddy.View.AboutPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:MVBuddy_Common_Controls="clr-namespace:MVBuddy.Common.Controls;assembly=MVBuddy.Common"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">
	<phone:PhoneApplicationPage.Resources>
		<DataTemplate x:Key="UsedComponentsItemTemplate">
			<StackPanel Margin="0,0,0,12">
				<TextBlock Text="{Binding Name, Mode=OneWay}" FontSize="{StaticResource PhoneFontSizeMediumLarge}" FontFamily="{StaticResource PhoneFontFamilyNormal}" Foreground="Black"/>
				<TextBlock Text="{Binding Copyright, Mode=OneWay}" FontSize="{StaticResource PhoneFontSizeMedium}" FontFamily="{StaticResource PhoneFontFamilySemiLight}">
					<TextBlock.Foreground>
						<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
							<GradientStop Color="Black" Offset="0"/>
							<GradientStop Color="Black" Offset="1"/>
						</LinearGradientBrush>
					</TextBlock.Foreground>
				</TextBlock>
				<HyperlinkButton Content="{Binding Website.OriginalString, Mode=OneWay}" NavigateUri="{Binding Website, Mode=OneWay}" Foreground="{StaticResource MVDarkOrangeBrush}" FontSize="{StaticResource PhoneFontSizeMedium}" FontFamily="{StaticResource PhoneFontFamilySemiLight}" TargetName="_blank" HorizontalContentAlignment="Left" Margin="-12,0,0,0"/>
			</StackPanel>
		</DataTemplate>
	</phone:PhoneApplicationPage.Resources>

	<phone:PhoneApplicationPage.DataContext>
		<Binding Mode="OneWay" Path="About" Source="{StaticResource Locator}"/>
	</phone:PhoneApplicationPage.DataContext>
	
    <!--LayoutRoot is the root grid where all page content is placed-->
	<Grid x:Name="LayoutRoot" Style="{StaticResource MVPageStyle}">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="*"/>
		</Grid.RowDefinitions>		
				
		<MVBuddy_Common_Controls:PageHeaderControl d:LayoutOverrides="Height"/>
        <!--Pivot Control-->
        <controls:Pivot Grid.Row="1" Foreground="{StaticResource MVDarkOrangeBrush}">
            <!--Pivot item one-->
            <controls:PivotItem Header="{Binding Path=LocalizedResources.About, Source={StaticResource LocalizedStrings}}" Foreground="Black">
                <StackPanel Margin="12,0,0,0">
                	<TextBlock TextWrapping="Wrap" Text="{Binding ApplicationName, Mode=OneWay}" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeExtraLarge}" Foreground="{StaticResource MVDarkOrangeBrush}"/>
                	<TextBlock TextWrapping="Wrap" Text="{Binding ApplicationVersion, Mode=OneWay}" FontFamily="{StaticResource PhoneFontFamilySemiLight}" FontSize="{StaticResource PhoneFontSizeMediumLarge}"/>
                	<TextBlock TextWrapping="Wrap" Text="Copyright Rodrigo 'r2d2rigo' Díaz 2013" FontFamily="{StaticResource PhoneFontFamilySemiLight}" Margin="0" FontSize="{StaticResource PhoneFontSizeNormal}"/>
                	<TextBlock TextWrapping="Wrap" Text="Media Vida Copyright 1999 - 2013 Redfive Labs" FontFamily="{StaticResource PhoneFontFamilySemiLight}" FontSize="{StaticResource PhoneFontSizeNormal}"/>
                	<TextBlock TextWrapping="Wrap" Text="{Binding Path=LocalizedResources.AboutDownloadText, Source={StaticResource LocalizedStrings}}" Margin="0,24,0,0" FontFamily="{StaticResource PhoneFontFamilySemiLight}" FontSize="{StaticResource PhoneFontSizeNormal}"/>
                	<HyperlinkButton Content="http://mvbuddy.r2d2rigo.es/" NavigateUri="http://mvbuddy.r2d2rigo.es/" HorizontalAlignment="Left" Foreground="{StaticResource MVDarkOrangeBrush}" FontSize="{StaticResource PhoneFontSizeNormal}" HorizontalContentAlignment="Left" FontFamily="{StaticResource PhoneFontFamilySemiLight}" TargetName="_blank" Margin="-12,0,0,0"/>
                </StackPanel>
            </controls:PivotItem>

            <!--Pivot item two-->
            <controls:PivotItem Header="{Binding Path=LocalizedResources.License, Source={StaticResource LocalizedStrings}}" Foreground="Black">
                <ScrollViewer d:LayoutOverrides="Height" Margin="12,0,0,0">
            		<StackPanel Margin="0,0,0,24">
                		<TextBlock TextWrapping="Wrap" Text="{Binding ApplicationLicense, Mode=OneWay}" d:LayoutOverrides="Width" FontSize="{StaticResource PhoneFontSizeNormal}" FontFamily="{StaticResource PhoneFontFamilySemiLight}"/>
                		<TextBlock TextWrapping="Wrap" Text="{Binding Path=LocalizedResources.LibrariesUsed, Source={StaticResource LocalizedStrings}}" Margin="0,24,0,0" FontSize="{StaticResource PhoneFontSizeNormal}" FontFamily="{StaticResource PhoneFontFamilySemiBold}"/>
                		<ListBox ItemsSource="{Binding UsedComponents}" ItemTemplate="{StaticResource UsedComponentsItemTemplate}" Margin="0,12,0,0" ScrollViewer.VerticalScrollBarVisibility="Disabled"/>
                	</StackPanel>
            	</ScrollViewer>
            </controls:PivotItem>
        </controls:Pivot>
    </Grid>
    
</phone:PhoneApplicationPage>